<?php
if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}
loadcache('plugin');
if(!defined('Adz_class')){include('source/plugin/alias/Adz.class.php');}
Adz::auth_admin();//判断权限
$rewite = $_G['cache']['plugin']['alias'];
if(!$rewite){
	echo '<br><h1 style="color:red;">'.lang('plugin/alias','start_plugin').'</h1>';exit;
}
$fm_tid = str_replace(array('.','{alias}'),array('\.','(.+)'),$rewite['fm_tid']);
$fm_tid7 = str_replace(array('{alias}'),array('(.+)'),$rewite['fm_tid']);
$fm_tid_page = str_replace(array('.','{alias}','{page}','{prevpage}'),array('\.','(.+)','([0-9]+)','([0-9]+)'),$rewite['fm_tid_page']);
$fm_tid_page7 = str_replace(array('{alias}','{page}','{prevpage}'),array('(.+)','([0-9]+)','([0-9]+)'),$rewite['fm_tid_page']);
$fm_rss = str_replace(array('.','{fid}'),array('\.','([0-9]+)'),$rewite['fm_rss']);
$fm_rss7 = str_replace(array('{fid}'),array('([0-9]+)'),$rewite['fm_rss']);
$fm_tag = str_replace(array('.'),array('\.'),$rewite['tag']);
$fm_tag7 = $rewite['tag'];
$fm_tags = str_replace(array('.','{tagid}'),array('\.','(.+)'),$rewite['tags']);
$fm_tags7 = str_replace(array('{tagid}'),array('(.+)'),$rewite['tags']);

include template('alias:rewrite');
?>